import 'package:aio/aio.dart';

///开票审核；开票信息；发票
class ReceiptBean extends BaseBean {
  //申请单号
  String? ReceiptCode = "";

  //申请人
  String? PersonName = "";

  //申请日期
  String? AddDate = "";

  //合同编号
  String? ContractCode = "";

  //合同外部编号
  String? OutCode = "";

  //项目名称
  String? ProjectName = "";

  //客户名称
  String? CustomerName = "";

  //客户编号
  String? CustomerCode = "";

  //发票抬头
  String? ReceiptTitle = "";

  //发票类型
  String? ReceiptType = "";

  //发票金额/申请金额
  String? Amount = "";

  //已开金额/已申请金额
  String? ReceiptAmount1 = "";

  //可开金额/可申请金额
  String? ReceiptAmount2 = "";

  //税率
  String? TaxRate = "";

  //税额
  String? Tax = "";

  //不含税金额
  String? ReceiptAmount3 = "";

  //发票备注
  String? ReceiptTitle2 = "";

  //发票号
  String? JinShuiCode = "";

  //纳税人识别号
  String? CompanySh = "";

  //地址电话
  String? CompanyAddress = "";

  //开户行及电话
  String? CompanyBank = "";

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    ReceiptCode = json['ReceiptCode']?.toString() ?? "";
    PersonName = json['PersonName']?.toString() ?? "";
    AddDate = json['AddDate']?.toString() ?? "";
    ContractCode = json['ContractCode']?.toString() ?? "";
    OutCode = json['OutCode']?.toString() ?? "";
    ProjectName = json['ProjectName']?.toString() ?? "";
    CustomerName = json['CustomerName']?.toString() ?? "";
    CustomerCode = json['CustomerCode']?.toString() ?? "";
    ReceiptTitle = json['ReceiptTitle']?.toString() ?? "";
    ReceiptType = json['ReceiptType']?.toString() ?? "";
    Amount = json['Amount']?.toString() ?? "";
    ReceiptAmount1 = json['ReceiptAmount1']?.toString() ?? "";
    ReceiptAmount2 = json['ReceiptAmount2']?.toString() ?? "";
    TaxRate = json['TaxRate']?.toString() ?? "";
    Tax = json['Tax']?.toString() ?? "";
    ReceiptAmount3 = json['ReceiptAmount3']?.toString() ?? "";
    ReceiptTitle2 = json['ReceiptTitle2']?.toString() ?? "";
    JinShuiCode = json['JinShuiCode']?.toString() ?? "";
    CompanySh = json['CompanySh']?.toString() ?? "";
    CompanyAddress = json['CompanyAddress']?.toString() ?? "";
    CompanyBank = json['CompanyBank']?.toString() ?? "";
    // json?.forEach((key, value) {
    //   print("key:$key\tvalue:\t$value");
    // });
  }

  @override
  instance() {
    // TODO: implement instance
    return ReceiptBean();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["ReceiptCode"] = ReceiptCode;
    map["PersonName"] = PersonName;
    map["AddDate"] = AddDate;
    map["ContractCode"] = ContractCode;
    map["OutCode"] = OutCode;
    map["ProjectName"] = ProjectName;
    map["CustomerCode"] = CustomerCode;
    map["CustomerName"] = CustomerName;
    map["ReceiptTitle"] = ReceiptTitle;
    map["ReceiptType"] = ReceiptType;
    map["Amount"] = Amount;
    map["ReceiptAmount1"] = ReceiptAmount1;
    map["ReceiptAmount2"] = ReceiptAmount2;
    map["TaxRate"] = TaxRate;
    map["Tax"] = Tax;
    map["ReceiptAmount3"] = ReceiptAmount3;
    map["ReceiptTitle2"] = ReceiptTitle2;
    map["JinShuiCode"] = JinShuiCode;
    map["CompanySh"] = CompanySh;
    map["CompanyAddress"] = CompanyAddress;
    map["CompanyBank"] = CompanyBank;
    return map;
  }
}

///发票明细;开票审核-》已开发票
class ReceiptDetail extends BaseBean {
  //发票号
  String? ReceiptCode = "";

  //开票人
  String? AddPersonName = "";

  //开票金额
  String? ReceiptAmount = "";

  //无税金额
  String? ReceiptAmountNoTax = "";

  //税额
  String? ReceiptAmountTax = "";

  //开票时间
  String? AddDate = "";

  //发票状态
  String? StatusName = "";

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    ReceiptCode = json['ReceiptCode']?.toString() ?? "";
    AddPersonName = json['AddPersonName']?.toString() ?? "";
    ReceiptAmount = json['ReceiptAmount']?.toString() ?? "";
    ReceiptAmountNoTax = json['ReceiptAmountNoTax']?.toString() ?? "";
    ReceiptAmountTax = json['ReceiptAmountTax']?.toString() ?? "";
    AddDate = json['AddDate']?.toString() ?? "";
    StatusName = json['StatusName']?.toString() ?? "";
    // json?.forEach((key, value) {
    //   print("key:$key\tvalue:\t$value");
    // });
  }

  @override
  instance() {
    // TODO: implement instance
    return ReceiptDetail();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["ReceiptCode"] = ReceiptCode;
    map["AddPersonName"] = AddPersonName;
    map["ReceiptAmount"] = ReceiptAmount;
    map["ReceiptAmountNoTax"] = ReceiptAmountNoTax;
    map["ReceiptAmountTax"] = ReceiptAmountTax;
    map["AddDate"] = AddDate;
    map["StatusName"] = StatusName;
    return map;
  }
}

///开票审核；申请条目
class ReceiptItem extends BaseBean {
  //数量（片）
  String? SumNum = "";

  //面积（㎡）
  String? SumArea = "";

  //重量（kg）
  String? SumWeight = "";

  //金额（元）
  String? Amount = "";

  //特殊加工费（元）
  String? OtherAmount = "";

  //减免后金额（元）
  String? AfterAmount = "";

  //减免后特殊加工费（元）
  String? AfterOtherAmount = "";

  //对账单号
  String? StatementCode = "";

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    SumNum = json['SumNum']?.toString() ?? "";
    SumArea = json['SumArea']?.toString() ?? "";
    SumWeight = json['SumWeight']?.toString() ?? "";
    Amount = json['Amount']?.toString() ?? "";
    OtherAmount = json['OtherAmount']?.toString() ?? "";
    AfterAmount = json['AfterAmount']?.toString() ?? "";
    AfterOtherAmount = json['AfterOtherAmount']?.toString() ?? "";
    StatementCode = json['StatementCode']?.toString() ?? "";
    // json?.forEach((key, value) {
    //   print("key:$key\tvalue:\t$value");
    // });
  }

  @override
  instance() {
    // TODO: implement instance
    return ReceiptItem();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["SumNum"] = SumNum;
    map["SumArea"] = SumArea;
    map["SumWeight"] = SumWeight;
    map["Amount"] = Amount;
    map["OtherAmount"] = OtherAmount;
    map["AfterAmount"] = AfterAmount;
    map["AfterOtherAmount"] = AfterOtherAmount;
    map["StatementCode"] = StatementCode;
    return map;
  }
}
